<template>
	<view class="sonlogin">
		<div>
			<navitop>
				<i class="iconfont icon-jiantou-copy" slot="left-slot" @click="outlot"></i>
				<span slot="center-slot"><h4></h4></span>
				<!-- <i  slot="right-slot" class="iconfont icon-jiahao"  @click="Scan_login"></i> -->
			</navitop> 
		</div>
		<div class="sonlogin_png" :style="'height:' + screen_width + 'px;'">
			<view>
				<i class="iconfont icon-huabanfuben"></i>
			</view>
			<view class="sonlogin_describe">
				进入PC客户端/网页www.sibanyun.com即可创建H5表单
			</view>
			<view class="sonlogin_login" @click="phone_sao">
				<text>扫码登录</text>
			</view>
			<br>
			<view>{{Scan_code}}</view>
		</div>
	</view>
</template>

<script>
import navitop from '@/components/common/navi-top'
export default {
	components:{
		navitop
	},
	data(){
		return{
			screen_width: '',
			Scan_code: ''
		}
	},
	onLoad() {
		let _this = this;
		uni.getSystemInfo({
		    success: function (res) {
				_this.screen_width = res.windowHeight;
		    }
		});
	},
	methods: {
		outlot(){
			uni.navigateBack();
		},
		phone_sao(){
			let _this = this;
			uni.scanCode({
			    onlyFromCamera: true,
			    success: function (res) {
					_this.Scan_code = '条码类型：' + res.scanType + '条码内容：' + res.result
			        console.log('条码类型：' + res.scanType);
			        console.log('条码内容：' + res.result);
			    }
			});
		}
	
	}
}	
</script>

<style lang="scss" scoped>
.sonlogin {
	width: 100%;
	height: 100%;
	.sonlogin_png {
		width: 95%;
		margin: auto;
		padding: 30% 0 0 0;
		text-align: center;
		background-color: #fff;
		i{
			font-size: 140px;
			color: rgb(34, 131, 228);
		}
		text {
			color: #fff;
			padding: 10px 30px 10px 30px;
			border-radius: 50px;
			background-color: rgb(34, 131, 228);
			
		}
		.sonlogin_login {
			padding: 30% 0 0 0;
		}
		.sonlogin_describe {
			width: 90%;
			margin: auto;
			padding: 10px 0 0 0;
		}
	}
}
</style>
